package com.lzh.persevere.model.entity;


import com.lzh.persevere.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 用户和角色关联表(SysUserRole)表实体类
 *
 * @author luzhiheng
 * @since 2023-12-28
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_user_role")
@Entity
@Table(name = "sys_user_role", indexes = {})
@Accessors(chain = true)
public class UserRole extends BaseEntity {

    /**
     * 用户ID
     */
    @Column(name = "user_id", columnDefinition = "bigint(20) COMMENT '用户ID'", nullable = false)
    private Long userId;

    /**
     * 角色ID
     */
    @Column(name = "role_id", columnDefinition = "bigint(20) COMMENT '角色ID'", nullable = false)
    private Long roleId;
}
